package box.tuson.com.tusonbox;
import android.support.v7.app.*;
import android.widget.*;
import android.os.*;
import android.view.View.*;
import android.view.*;
import android.support.design.widget.*;
import android.content.*;

public class tswz extends AppCompatActivity implements OnClickListener
{
	private EditText ed1,ed2;
	private Button bt1,bt2,bt3,bt4,bt5,bt6,bt7,bt8,bt9,bt10,bt11,bt12,bt13,bt14,bt15,bt16,bt17,bt18,bt19,bt20;
	
	/*class MyClicklistener implements OnClickListener
	{

		@Override
		public void onClick(View p1)
		{
			// TODO: Implement this method
			switch (p1.getId())
			{

				case R.id.bt1:
					init("༒࿈毒༙྇༒࿈");
					break;
				case R.id.bt2:
					init("༓毒̦̒༓");
					break;
				case R.id.bt3:
					init("꧁毒̖꧂");
					break;
				case R.id.bt4:
					init("[̲̅毒̲̲̅̅]");
					break;
				case R.id.bt5:
					init("毒҉̅");
					break;
				case R.id.bt6:
					init("毒ۣۖิ");
					break;
				case R.id.bt7:
					init("ζั͡ั͡毒ั͡ζั͡ ✾");
					break;
				case R.id.bt8:
					init("毒ืุ");
					break;
				case R.id.bt9:
					init("❦毒❧");
					break;
				case R.id.bt10:
					init("毒⃢⃢");
					break;
				case R.id.bt11:
					init("༄࿆毒࿆࿐");
					break;
				case R.id.bt12:
					init("ℳℓ毒");
					break;
				case R.id.bt13:
					init("༺ۣۖิ毒༒ۣۖิ");
					break;
				case R.id.bt14:
					init("༺ۣۖิ毒༒ۣۖิ༻");
					break;
				case R.id.bt15:
					init("ζั͡毒ั͡ั͡✾");
					break;
				case R.id.bt16:
					init("毒̶");
					break;
				case R.id.bt17:
					init("ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎毒ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎");
					break;
				case R.id.bt18:
					init("ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็毒ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็");
					break;
				case R.id.bt19:
					init("ۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖ 毒 ۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖ");
					break;
			}
		
			}

	}
	*/
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tswz);

		ed1 = (EditText) findViewById(R.id.teshuEditText1);
		ed2 = (EditText) findViewById(R.id.teshuEditText2);

		bt1 = (Button) findViewById(R.id.bt1);
		bt2 = (Button) findViewById(R.id.bt2);
		bt3 = (Button) findViewById(R.id.bt3);
		bt4 = (Button) findViewById(R.id.bt4);
		bt5 = (Button) findViewById(R.id.bt5);
		bt6 = (Button) findViewById(R.id.bt6);
		bt7 = (Button) findViewById(R.id.bt7);
		bt8 = (Button) findViewById(R.id.bt8);
		bt9 = (Button) findViewById(R.id.bt9);
		bt10 = (Button) findViewById(R.id.bt10);
		bt11 = (Button) findViewById(R.id.bt11);
		bt12 = (Button) findViewById(R.id.bt12);
		bt13 = (Button) findViewById(R.id.bt13);
		bt14 = (Button) findViewById(R.id.bt14);
		bt15 = (Button) findViewById(R.id.bt15);
        bt16 = (Button) findViewById(R.id.bt16);
        bt17 = (Button) findViewById(R.id.bt17);
        bt18 = (Button) findViewById(R.id.bt18);
        bt19 = (Button) findViewById(R.id.bt19);
		bt20 = (Button) findViewById(R.id.bt20);
	
		bt1.setOnClickListener(this);
		bt2.setOnClickListener(this);
		bt3.setOnClickListener(this);
		bt4.setOnClickListener(this);
		bt5.setOnClickListener(this);
		bt6.setOnClickListener(this);
		bt7.setOnClickListener(this);
		bt8.setOnClickListener(this);
		bt9.setOnClickListener(this);
		bt10.setOnClickListener(this);
		bt11.setOnClickListener(this);
		bt12.setOnClickListener(this);
		bt13.setOnClickListener(this);
		bt14.setOnClickListener(this);
		bt15.setOnClickListener(this);
        bt16.setOnClickListener(this);
        bt17.setOnClickListener(this);
        bt18.setOnClickListener(this);
        bt19.setOnClickListener(this);
        bt20.setOnClickListener(this);
		FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
				@Override
				public void onClick(View view) {
					Snackbar.make(view, "复制成功～", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
						ClipboardManager fz = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
					ed2 = (EditText) findViewById(R.id.teshuEditText2);
						fz.setText(ed2.getText());
						}
						});
	}

	@Override
	public void onClick(View p1)
	{
		// TODO: Implement this method
		switch (p1.getId())
		{

			case R.id.bt1:
				init("༒࿈毒༙྇༒࿈");
				break;
			case R.id.bt2:
				init("༓毒̦̒༓");
				break;
			case R.id.bt3:
				init("꧁毒̖꧂");
				break;
			case R.id.bt4:
				init("[̲̅毒̲̲̅̅]");
				break;
			case R.id.bt5:
				init("毒҉̅");
				break;
			case R.id.bt6:
				init("毒ۣۖิ");
				break;
			case R.id.bt7:
				init("ζั͡ั͡毒ั͡ζั͡ ✾");
				break;
			case R.id.bt8:
				init("毒ืุ");
				break;
			case R.id.bt9:
				init("❦毒❧");
				break;
			case R.id.bt10:
				init("哈⃢⃢⃢⃢");
				break;
			case R.id.bt11:
				init("༄࿆毒࿆࿐");
				break;
			case R.id.bt12:
				init("ℳℓ毒");
				break;
			case R.id.bt13:
				init("༺ۣۖิ毒༒ۣۖิ");
				break;
			case R.id.bt14:
				init("༺ۣۖิ毒༒ۣۖิ༻");
				break;
			case R.id.bt15:
				init("ζั͡毒ั͡ั͡✾");
				break;
			case R.id.bt16:
				init("毒̶");
				break;
			case R.id.bt17:
				init("ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎毒ฏ๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎๎");
				break;
			case R.id.bt18:
				init("ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็毒ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็");
				break;
			case R.id.bt19:
				init("ۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖ 毒 ۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۣۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖۖ");
				break;
			case R.id.bt20:
				init("͞土͟͞=͟");
				break;
		}
		}


	private void init(String v)
	{
		String os=ed1.getText().toString();
		char[] a=os.toCharArray();
		StringBuffer b=new StringBuffer("");
		String mo=v;
		for (int i=0;i < a.length;i++)
		{
			b.append(mo.replace('毒', a[i]));
		}

		ed2.setText(b);
		if (os.equals(""))
		{
			Toast.makeText(this, "请输入文字", Toast.LENGTH_SHORT).show();
		}

	}

}

